﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using YEngineLib;

namespace Spyfall.States
{
    class City
    {
        Texture2D cityTexture;
        Vector2 pos;
        float amount;
        float totalTime;
        float speed;

        public void Initialize()
        {
            cityTexture = YEngine.Game.Content.Load<Texture2D>("Graphics/city");

            amount = 1340;
            totalTime = 10;  //CHANGE THIS TO ADJUST DISTANCE
            pos.X = 0;
            pos.Y = 0;
            speed = amount / totalTime;
        }

        public void Update(float fElapsedTime)
        {
            float fall = speed * fElapsedTime;
            if( pos.Y >= -1220 )
            pos.Y -= fall;
        }

        public void Draw()
        {
            YEngine.Graphics.SpriteBatch.Draw(cityTexture, pos, Color.White);
        }

    }
}
